#include <linux/module.h>
#include <linux/fs.h>
#include <linux/errno.h>
#include <linux/miscdevice.h>
#include <linux/kernel.h>
#include <linux/major.h>
#include <linux/mutex.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/stat.h>
#include <linux/init.h>
#include <linux/device.h>
#include <linux/tty.h>
#include <linux/kmod.h>
#include <linux/gfp.h>
#include <asm/io.h>
#include <linux/platform_device.h>
#include "led_resources.h"

static void imx6ull_dev_release(struct device *dev)
{
}

static struct resource imx6ull_src[] = {
    {
        .start = GROUP_PIN(5,3),
        .flags = IORESOURCE_IRQ,
        .name  = "fison_led_pin"
    },
    {
        .start = GROUP_PIN(3,1),
        .flags = IORESOURCE_IRQ,
        .name  = "fison_led_pin"
    },
};

static struct platform_device imx6ull_led = {
    .name          = "fison_led_platform",
    .resource      = imx6ull_src,
    .num_resources = ARRAY_SIZE(imx6ull_src),
    .dev           = {
        .release   = imx6ull_dev_release,
    }

};


static int __init led_dev_init(void){
    int err = platform_device_register(&imx6ull_led);
    return 0;
}

static void __exit led_dev_exit(void){
    platform_device_unregister(&imx6ull_led);
}

module_init(led_dev_init);
module_exit(led_dev_exit);

MODULE_AUTHOR("fison");
MODULE_DESCRIPTION("led platform device for imx6ull");
MODULE_LICENSE("GPL");
